<div id="ketqua_theongay">
    <h4>KẾT QUẢ NGÀY <?php echo $model->date; ?></h4>
    <table width="100%" border="1">
        <tr>
            <td width="11%" style="color:red; text-align:center"><h3><strong>X80</strong></h3></td>
            <td width="24%" style="color:red; text-align:center"><h3><strong>X8</strong></h3></td>
            <td width="65%" style="color:red; text-align:center"><h3><strong>X3.5</strong></h3></td>
        </tr>
        <tr>
            <td style="color: green; text-align:center"><h4><strong>
                        <?php
                        $arrx80 = json_decode($model->x80);
                        echo $arrx80[0];
                        ?></strong></h4></td>
            <td style="color:green; text-align:center"><h4><strong>
                        <?php
                        $arrx8 = json_decode($model->x8);
                        echo join(' - ', $arrx8);
                        ?></strong></h4></td>
            <td align="center" style="color:green; text-align:left"><h6><strong>
                        <?php
                        $arrx3dot5 = json_decode($model->x3dot5);
                        echo join(' - ', array_slice($arrx3dot5, 0, 9));
                        ?><br/>
                        <?php
                        echo join(' - ', array_slice($arrx3dot5, 9, 9));
                        ?><br/>
                        <?php
                        echo join(' - ', array_slice($arrx3dot5, 18, 9));
                        ?></strong></h6></td>
        </tr>
    </table>

    <script>
        function xem_ketquaxoso_theongay()
        {
            // Load ket qua xo so
            $.ajax({
                url: '<?php echo Yii::app()->request->baseUrl; ?>/index.php/site/AjaxXemKetQuaXoSo',
                type: 'GET',
                data: "view_date=" + $('#view_date').val(),
                beforeSend: function()
                {
                    $('#ketqua_theongay').html('<img src="<?php echo Yii::app()->request->baseUrl; ?>/images/ajax-loader.gif"/>');
                },
                success: function(data)
                {
                    $('#ketqua_theongay').html(data);
                }
            });
        }
    </script>
</div>
<div>
    Chọn ngày: <input id="view_date" type="text" value="<?php echo date('Y-m-d'); ?>" name="view_date" /><input class="button active" type="button" onclick="xem_ketquaxoso_theongay();" value="Xem"/>
</div>